package com.nf.xiaomi.service;

import com.nf.xiaomi.entity.OrderEntity;

import java.util.List;

public interface OrderDetailService {
    List<OrderEntity> getAll();

    List<OrderEntity> getAll(Integer orderState);

    List<OrderEntity> getAll(Long account);

    List<OrderEntity> confirmOrder(Long account, Integer orderID);

    Integer insert(OrderEntity order);

    Integer deleteByID(Integer orderID);

    default Integer[] getDetailIds(List<OrderEntity> orderEntityList){
        Integer[] ids=new Integer[orderEntityList.size()];
        for (int i = 0; i < orderEntityList.size(); i++) {
            ids[i]=orderEntityList.get(i).getProductDetailID();
        }
        return ids;
    }
}
